The present invention relates to a technology for detecting an enlarging ratio or a reducing ratio of digital image data in which the enlarging ratio or reducing ratio of an image is unknown.
Conventionally, image enlarging or reducing ratio detecting circuit circuits are provided with an enlarging or reducing ratio of an image as an objective. The sought after ratio is provided as additional data for the image in some data form, as is described in JP-A-51294/1992, JP-A-295545/1995 and JP-A-129356/1996.
However, in the above-described technology, the data must be manipulated in a number of ways. There is a chance that during the manipulation the additional data can be easily destroyed as the result of a small data disturbance. Once destroyed, the reducing or enlarging ratio of the original image is lost.
This difficulity can be overcome with the addition of a circuit that has means for restoring the additional data. The circuit can add that a complicated error correction technique or attach additional redundant ratio data to the image data or use a variety of other data integrity improvement methods.
The resulting apparatus, however, becomes to be complicated and has increased dimensional needs.
Also, in the conventional technology, the reducing or enlarging ratio is detected by including a reference signal (referred to as a synchronizing signal) in the image itself. The synchronizing signal is repeated while the image itself is reduced or enlarged and the synchronizing signal can be detected with the largest amplitude to discover the ratio.
However, inserting the synchronizing signal in the image itself provided additional data or noise which has an impact on image quality. Moreover, since the reduction and enlargement is repeatedly conducted over an entire image plane, the operation requires a large amount of processing and memory. The image requires a large amount of physical memory for storage during these operations, and as a consequence the circuit becomes large in size.
Therefore, it is an objective of the present invention is to solve the above-described tasks.
Also, it is an objective of the present invention is to provide a detection apparatus and a detection method for detecting an appropriate image reducing or enlarging ratio with simple circuit size without affecting quality of an image.
The above-described objective of the present invention is achieved by an enlarging ratio detecting apparatus for detecting an enlarging ratio of a digital image data in which the enlarging ratio of an image is unknown. The enlarging ratio detecting apparatus includes a section unit for sectioning the digital image data, in which the enlarging ratio of an image is unknown, by predetermined horizontal or perpendicular block sizes, a conversion unit for frequency-converting sectioned blocks into a two-dimension, an addition unit operating on each frequency to provide sums of all the individual frequencies over all the blocks, a retrieval unit for retrieving frequencies at which energy is collecting using an added result, a calculation unit for calculating an enlarging ratio based on a retrieved result, and a restoration unit for restoring an image of an image data to an image having the calculated enlarging ratio.
Also, the above-described objective of the present invention is achieved by a reducing ratio detecting apparatus for detecting a reducing ratio of a digital image data in which the reducing ratio of an image is unknown. The reducing ratio detecting apparatus includes a section unit for sectioning the digital image data, in which the reducing ratio of an image is unknown, by predetermined horizontal or perpendicular block sizes, a conversion unit for frequency-converting sectioned blocks into a two-dimension, an addition unit operating on each frequency to obtain sums of all the individual frequencies over all the blocks, a retrieval unit for retrieving frequencies at which energy is collecting using an added result, a calculation unit for calculating a reducing ratio based on a retrieved result, and a restoration means for restoring an image of an image data to an image having the calculated reducing ratio.
It is preferable that the above-described retrieval unit is constructed so as to select n signals which have frequencies in order of the highest energy, and to obtain a frequency-energy distribution in which energy is collecting.
Moreover, the above-described calculation unit determines a set of frequencies from the frequency-energy distribution obtained by the retrieval unit, at which energy is collecting, and calculates an enlarging ratio or reducing ratio that corresponds to this set.
Also, if a loop circuit for returning an output from the above-described restoration unit to the above-described section unit again, even though a correct enlarging ratio or reducing ratio cannot be obtained one time, processing can be conducted again based on a rough enlarging ratio or reducing ratio obtained at the first time.
In addition, of course, it is possible to construct one apparatus, an enlarging ratio or reducing detecting apparatus, by combining the above-described enlarging ratio detecting apparatus and the above-described reducing ratio detecting apparatus.
Also, the above-described objective of the present invention is achieved by an image data enlarging ratio detecting method of detecting an enlarging ratio of a digital image data in which the enlarging ratio of an image is unknown. The image data enlarging ratio detecting method includes steps of:
(a) sectioning the digital image data, in which the enlarging ratio of an image is unknown, by predetermined horizontal or perpendicular block sizes;
(b) frequency-converting sectioned blocks into a two-dimension;
(c) adding up frequencies present in the above-described blocks to obtain sums for each frequency across all of the blocks;
(d) obtaining a set of frequencies at which energy is collecting using a result of the above-described sum; and
(e) calculating an enlarging ratio of an image based on the above-described set of frequencies at which energy is collecting.
Furthermore, the above-described objective of the present invention is achieved by an image data reducing ratio detecting method of detecting a reducing ratio of a digital image data in which the reducing ratio of an image is unknown. The image data reducing ratio detecting method includes steps of:
(a) sectioning the digital image data, in which the reducing ratio of an image is unknown, by predetermined horizontal or perpendicular block sizes;
(b) frequency-converting sectioned blocks into a two-dimension;
(c) adding up frequencies present in the above-described blocks to obtain sums for each frequency across all of the blocks; frequency;
(d) obtaining a set of frequencies at which energy is collecting using a result of the above-described sum; and
(e) calculating a reducing ratio of an image based on the above-described set of frequencies at which energy is collecting.
In the above-described step (d), n frequencies in order of the highest energy are selected, and a frequency-energy distribution in which energy is collecting is obtained, and in the above-described step (e), a set of frequencies at which energy is collecting is determined based on the obtained frequency-energy distribution, and an enlarging ratio or reducing ratio that corresponds to this set is calculated.
In addition, even though a correct enlarging ratio or reducing ratio cannot be obtained one time, it is possible to obtain a more correct enlarging ratio or reducing ratio by repeating the above-described steps again.
In accordance with the present invention as constructed above, an enlarging ratio or reducing ratio of an image is not affected by a disturbance. The reason thereof is that it is not necessary to attach the reducing or enlarging ratio to the image as a data in a form of adding the ratio to the image, and that the data of the enlarging ratio or reducing ratio is not lost.
Also, in accordance with the present invention, it is possible to prevent deterioration of an image. The reason thereof is that it is not necessary to insert an image reference signal for finding original size of an image into the image.